package com.sctvcloud.weiyuan.ui.adapter.holder;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.sctvcloud.weiyuan.R;
import com.sctvcloud.weiyuan.beans.HomeListItem;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 精选 文明实践入口
 */
public class WeMingHolder  extends BaseAbsHolder<HomeListItem> {


    private OnWenMingEntryClickListener entryClickListener;

    public WeMingHolder(Context context, View itemView, OnWenMingEntryClickListener listener) {
        super(context, itemView);
        this.entryClickListener = listener;
    }

    @Override
    public void setData(HomeListItem newsItem) {

    }

    @Override
    protected void initInject() {
        ButterKnife.bind(this, itemView);
    }

    @OnClick(value = {R.id.wenmingshijian})
    public void onClick(View view) {
        if (null != entryClickListener) {
            if (view.getId() == R.id.wenmingshijian) {
                entryClickListener.OnWenMingEntryClick();
            }
        }
    }

    public void setWenMingEntryClickListener( OnWenMingEntryClickListener entryClickListener) {
        this.entryClickListener = entryClickListener;
    }

    public interface OnWenMingEntryClickListener {
        void OnWenMingEntryClick();
    }
}
